import {
    Column,
    CreateDateColumn,
    Entity,
    PrimaryGeneratedColumn,
    UpdateDateColumn,
} from 'typeorm';

@Entity('users')
export class User {
    @PrimaryGeneratedColumn()
    id: number;

    @Column({
        unique: true,
    })
    username: string;

    @Column({
        default: false,
    })
    locked: boolean;

    @Column({
        default: true,
    })
    enabled: boolean;

    @CreateDateColumn({
        name: 'created_time',
    })
    createdTime: Date;

    @UpdateDateColumn({
        name: 'updated_time',
    })
    updatedTime: Date;
}
